﻿
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace A.M.Joint_Search
{
    public class BaseOrmServices : IBaseOrmServices
    {
        private readonly IBaseOrmRepository baseOrmRepository;
        public BaseOrmServices(IBaseOrmRepository baseOrmRepository)
        {
            this.baseOrmRepository = baseOrmRepository;
        }

        public Task<List<T>> getJoinList<T1, T2,T>(Expression<Func<T1, T2, JoinQueryInfos>> joinExp, Expression<Func<T1, T2, T>> selectExp, bool isWhere = false, Expression<Func<T1, T2, bool>> whereExp = null)
        {
            return baseOrmRepository.getJoinList(joinExp, selectExp, isWhere, whereExp);
        }
    }
}
